import React, { useState } from "react";
import { Modal } from "../components";

export const BaseDemo = () => {
  const [open, setOpen] = useState(false);

  return (
    <>
      <div>
        <div className="primary-btn" onClick={() => setOpen(true)}>
          打开弹窗
        </div>
      </div>
      <Modal
        title="Modal Title"
        open={open}
        onClose={() => setOpen(false)}
        onConfirm={() => {
          console.log("onConfirm");
          setOpen(false);
        }}
      >
        弹窗内容
        <div>show everything you want here</div>
      </Modal>
    </>
  );
};
